package com.yuqing.sentimentapp.api;

import com.linkface.baselibrary.http.BaseBean;
import com.yuqing.sentimentapp.home.bean.EarlyWarningDataBean;
import com.yuqing.sentimentapp.home.bean.HotChannelBean;
import com.yuqing.sentimentapp.home.bean.IssuedPrepareDataBean;
import com.yuqing.sentimentapp.home.bean.IssuedSaveRegionDataBean;
import com.yuqing.sentimentapp.home.bean.NewsDataBean;
import com.yuqing.sentimentapp.home.bean.NewsDetailDataBean;
import com.yuqing.sentimentapp.home.bean.RecommendDataBean;
import com.yuqing.sentimentapp.home.bean.ReplyDataBean;
import com.yuqing.sentimentapp.home.bean.SpecialTopicDetailDataBean;
import com.yuqing.sentimentapp.login.bean.LoginResultBean;
import com.yuqing.sentimentapp.mine.bean.MinePersonInfoBean;
import com.yuqing.sentimentapp.mine.bean.MinePlatformInfoBean;
import com.yuqing.sentimentapp.update.UpdateInfoBean;
import com.yuqing.sentimentapp.workspace.action.entity.ActionInfoResult;
import com.yuqing.sentimentapp.workspace.action.entity.ActionReportResult;
import com.yuqing.sentimentapp.workspace.duty.entity.DutyInfoResult;
import com.yuqing.sentimentapp.workspace.duty.entity.DutyReportResult;
import com.yuqing.sentimentapp.workspace.duty.entity.ReportUnitInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.action.entity.EpidemicActionInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.action.entity.EpidemicActionReportResult;
import com.yuqing.sentimentapp.workspace.epidemic.material.entity.EpidemicMaterialInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.material.entity.EpidemicMaterialReportResult;
import com.yuqing.sentimentapp.workspace.epidemic.personal.entity.EpidemicPersonalInfoResult;
import com.yuqing.sentimentapp.workspace.epidemic.personal.entity.EpidemicPersonalReportResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalActionInfoResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalActionReportResult;
import com.yuqing.sentimentapp.workspace.festival.action.entity.FestivalUnitInfoResult;
import com.yuqing.sentimentapp.workspace.festival.activity.entity.FestivalActivityInfoResult;
import com.yuqing.sentimentapp.workspace.festival.activity.entity.FestivalActivityReportResult;
import com.yuqing.sentimentapp.workspace.heavyrainfallflood.entity.HeavyRainfallFloodInfoResult;
import com.yuqing.sentimentapp.workspace.heavyrainfallflood.entity.HeavyRainfallFloodReportResult;
import com.yuqing.sentimentapp.workspace.search.entity.CityResult;
import com.yuqing.sentimentapp.workspace.search.entity.RegionResult;
import com.yuqing.sentimentapp.workspace.search.entity.YqSearchResult;
import com.yuqing.sentimentapp.workspace.springfire.entity.SpringFireInfoResult;
import com.yuqing.sentimentapp.workspace.springfire.entity.SpringFireReportResult;
import com.yuqing.sentimentapp.workspace.statistics.entity.StatisticsInfoResult;
import com.yuqing.sentimentapp.workspace.statistics.entity.StatisticsReportResult;
import com.yuqing.sentimentapp.workspace.todayreport.entity.TodayReportInfoResult;
import com.yuqing.sentimentapp.workspace.todayreport.entity.TodayReportReportResult;
import com.yuqing.sentimentapp.workspace.typhoon.entity.TyphoonInfoResult;
import com.yuqing.sentimentapp.workspace.typhoon.entity.TyphoonReportResult;
import com.yuqing.sentimentapp.workspace.week.entity.WeekPlanInfoResult;
import com.yuqing.sentimentapp.workspace.week.entity.WeekPlanReportResult;
import com.yuqing.sentimentapp.yqlist.bean.YqDetailResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqListResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqReplyResultBean;
import com.yuqing.sentimentapp.yqlist.bean.YqReportResultBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by lvr on 2017/2/8.
 */

public interface ApiService {

    @FormUrlEncoded
    @POST("/app/login")
    Observable<LoginResultBean> postLogin(@Field("phone") String phone, @Field("check") String verifyCode);

    @GET("/home/warning")
    Observable<EarlyWarningDataBean> getEarlyWarnningResult(@Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/yuqing/list")
    Observable<YqListResultBean> getYqListResult(@Query("phone") String phone, @Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/yuqing/detail")
    Observable<YqDetailResultBean> getYqDetailResult(@Query("articleId") String articleId, @Query("deptCode") String deptCode);

    @GET("/personal/info")
    Observable<MinePersonInfoBean> getPersonCenterInfo(@Query("phone") String phone);

    @GET("/personal/about")
    Observable<MinePlatformInfoBean> getPlatformInfo();

    @GET("/personal/version")
    Observable<UpdateInfoBean> getUpdateInfo(@Query("versionCode") int versionCode);

    @FormUrlEncoded
    @POST("/reply/add")
    Observable<YqReportResultBean> postReportDataResult(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/reply/redo")
    Observable<YqReportResultBean> postReportAgainDataResult(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/column/operate")
    Observable<BaseBean> uploadChannelResult(@Field("cate") String cate, @Field("status") String status);
    
    @GET("/home/recommend")
    Observable<RecommendDataBean> getRecommendDataResult(@Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/news/list")
    Observable<NewsDataBean> getNewsDataResult(@Query("phone") String phone, @Query("category") String category, @Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/special/current")
    Observable<NewsDataBean> getSpecialTopicDataResult(@Query("phone") String phone, @Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/special/analysis")
    Observable<NewsDataBean> getTopicAnalysisDataResult(@Query("phone") String phone, @Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/news/detail")
    Observable<NewsDetailDataBean> getNewsDetailDataResult(@Query("mobile") String mobile, @Query("newsId") String webUrl);

    @FormUrlEncoded
    @POST("/reply/comment")
    Observable<YqReplyResultBean> replyRequest(@Field("replyId") String replyId, @Field("remark") String remark);

    @FormUrlEncoded
    @POST("/yuqing/prePub")
    Observable<IssuedPrepareDataBean> loadIssuedPrepareRequest(@Field("articleId") String articleId, @Field("subDept") String subDeptCode);

    @FormUrlEncoded
    @POST("/yuqing/saveRegion")
    Observable<IssuedSaveRegionDataBean> saveIssuedRegionRequest(@Field("articleId") String articleId, @Field("province") String province, @Field("city") String city, @Field("county") String county);

    @FormUrlEncoded
    @POST("/yuqing/pub")
    Observable<BaseBean> postIssuedRequest(@Field("articleId") String articleId, @Field("subDept") String subDept);

    @POST("/app/logout")
    Observable<BaseBean> postLogoutRequest();

    @FormUrlEncoded
    @POST("/yuqing/hide")
    Observable<BaseBean> postHideRequest(@Field("articleId") String articleId);

    @GET("/special/currentView")
    Observable<SpecialTopicDetailDataBean> getSpecialTopicDetailRequest(@Query("id") String id);

    @FormUrlEncoded
    @POST("/personal/notice")
    Observable<BaseBean> postNoticeRequest(@Field("wxNotice") int wxNotice, @Field("appNotice") int appNotice, @Field("buildId") int buildId);

    @GET("/yuqing/list")
    Observable<YqListResultBean> getYqSearchListResult(@Query("page") int page, @Query("pageSize") int pageSize, @Query("keyword") String keyword);

    @GET("/home/hotColumn")
    Observable<HotChannelBean> getHotChannelRequest();

    @Streaming
    @GET
    Call<ResponseBody> downloadFileWithDynamicUrlAsync(@Url String fileUrl);

    @FormUrlEncoded
    @POST("/app/sendMessage")
    Observable<BaseBean> postVerifyCodeRequest(@Field("phone") String phone, @Field("IMEI") String imei, @Field("time") long time, @Field("token") String token);

    @GET("/reply/getReply")
    Observable<ReplyDataBean> getReplyDataRequest(@Query("replyId") String replyId);

    @FormUrlEncoded
    @POST("/app/authLogin")
    Observable<LoginResultBean> postAuthLogin(@Field("code") String code);

    @GET("/app/duty/show")
    Observable<DutyReportResult> getDutyReportInfo();

    @GET("/app/duty/get-one")
    Observable<DutyInfoResult> getDutyInfo(@Query("id") String id);

    @GET("/app/duty/list")
    Observable<ReportUnitInfoResult> getDutyReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/duty/save")
    Observable<BaseBean> saveDutyReportInfo(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/app/duty/update")
    Observable<BaseBean> updateDutyReportInfo(@FieldMap Map<String, String> dutyInfoMap);

    @Streaming
    @GET("/app/duty/export-history")
    Call<ResponseBody> exportDutyHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/duty/export")
    Call<ResponseBody> exportDutyTodayReportInfo();




    @GET("/app/action/show")
    Observable<ActionReportResult> getActionReportInfo();

    @GET("/app/action/get-one")
    Observable<ActionInfoResult> getActionInfo(@Query("id") String id);

    @GET("/app/action/list")
    Observable<ReportUnitInfoResult> getActionReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/action/save")
    Observable<BaseBean> saveActionReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/action/update")
    Observable<BaseBean> updateActionReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/action/export-history")
    Call<ResponseBody> exportActionHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/action/export")
    Call<ResponseBody> exportActionTodayReportInfo();

    @GET("/app/festivalAction/show")
    Observable<FestivalActionReportResult> getFestivalActionReportInfo();

    @GET("/app/festivalAction/get-one")
    Observable<FestivalActionInfoResult> getFestivalActionInfo(@Query("id") String id);

    @GET("/app/festivalAction/list")
    Observable<ReportUnitInfoResult> getFestivalActionReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/festivalAction/save")
    Observable<BaseBean> saveFestivalActionReportInfo(@FieldMap Map<String, String> festivalActionInfoMap);

    @FormUrlEncoded
    @POST("/app/festivalAction/update")
    Observable<BaseBean> updateFestivalActionReportInfo(@FieldMap Map<String, String> festivalActionInfoMap);

    @Streaming
    @GET("/app/festivalAction/export-history")
    Call<ResponseBody> exportFestivalActionHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to,  @Query("festival") String festival,  @Query("year") String year);

    @Streaming
    @GET("/app/festivalAction/export")
    Call<ResponseBody> exportFestivalActionTodayReportInfo();

    @GET("/app/festivalAction/list")
    Observable<FestivalUnitInfoResult> getFestivalListData();


    @GET("/app/epidemic-report/personal-show")
    Observable<EpidemicPersonalReportResult> getEpidemicPersonalTodayInfo();

    @GET("/app/epidemic-report/personal-get-one")
    Observable<EpidemicPersonalInfoResult> getEpidemicPersonalReportInfo(@Query("id") String id);

    @GET("/app/epidemic-report/personal-list")
    Observable<ReportUnitInfoResult> getEpidemicPersonalReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/epidemic-report/personal-save")
    Observable<BaseBean> saveEpidemicPersonalReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/epidemic-report/personal-update")
    Observable<BaseBean> updateEpidemicPersonalReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/epidemic-report/personal-export-history")
    Call<ResponseBody> exportEpidemicPersonalHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/epidemic-report/personal-export")
    Call<ResponseBody> exportEpidemicPersonalTodayReportInfo();




    @GET("/app/epidemic-report/action-show")
    Observable<EpidemicActionReportResult> getEpidemicActionTodayInfo();

    @GET("/app/epidemic-report/action-get-one")
    Observable<EpidemicActionInfoResult> getEpidemicActionReportInfo(@Query("id") String id);

    @GET("/app/epidemic-report/action-list")
    Observable<ReportUnitInfoResult> getEpidemicActionReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/epidemic-report/action-save")
    Observable<BaseBean> saveEpidemicActionReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/epidemic-report/action-update")
    Observable<BaseBean> updateEpidemicActionReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/epidemic-report/action-export-history")
    Call<ResponseBody> exportEpidemicActionHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/epidemic-report/action-export")
    Call<ResponseBody> exportEpidemicActionTodayReportInfo();




    @GET("/app/epidemic-report/material-show")
    Observable<EpidemicMaterialReportResult> getEpidemicMaterialTodayInfo();

    @GET("/app/epidemic-report/material-get-one")
    Observable<EpidemicMaterialInfoResult> getEpidemicMaterialReportInfo(@Query("id") String id);

    @GET("/app/epidemic-report/material-list")
    Observable<ReportUnitInfoResult> getEpidemicMaterialReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/epidemic-report/material-save")
    Observable<BaseBean> saveEpidemicMaterialReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/epidemic-report/material-update")
    Observable<BaseBean> updateEpidemicMaterialReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/epidemic-report/material-export-history")
    Call<ResponseBody> exportEpidemicMaterialHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/epidemic-report/material-export")
    Call<ResponseBody> exportEpidemicMaterialTodayReportInfo();




    @GET("/app/festivalActivity/show")
    Observable<FestivalActivityReportResult> getFestivalActivityTodayInfo();

    @GET("/app/festivalActivity/get-one")
    Observable<FestivalActivityInfoResult> getFestivalActivityReportInfo(@Query("id") String id);

    @GET("/app/festivalActivity/list")
    Observable<ReportUnitInfoResult> getFestivalActivityReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/festivalActivity/save")
    Observable<BaseBean> saveFestivalActivityReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/festivalActivity/update")
    Observable<BaseBean> updateFestivalActivityReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/festivalActivity/export-history")
    Call<ResponseBody> exportFestivalActivityHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to, @Query("festival") String festival, @Query("year") String year);

    @Streaming
    @GET("/app/festivalActivity/export")
    Call<ResponseBody> exportFestivalActivityTodayReportInfo();




    @GET("/app/heavyRainfallFloodSta/show")
    Observable<HeavyRainfallFloodReportResult> getHeavyRainfallFloodTodayInfo();

    @GET("/app/heavyRainfallFloodSta/get-one")
    Observable<HeavyRainfallFloodInfoResult> getHeavyRainfallFloodReportInfo(@Query("id") String id);

    @GET("/app/heavyRainfallFloodSta/list")
    Observable<ReportUnitInfoResult> getHeavyRainfallFloodReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/heavyRainfallFloodSta/save")
    Observable<BaseBean> saveHeavyRainfallFloodReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/heavyRainfallFloodSta/update")
    Observable<BaseBean> updateHeavyRainfallFloodReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/heavyRainfallFloodSta/export-history")
    Call<ResponseBody> exportHeavyRainfallFloodHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/heavyRainfallFloodSta/export")
    Call<ResponseBody> exportHeavyRainfallFloodTodayReportInfo();




    @GET("/app/typhoonSta/show")
    Observable<TyphoonReportResult> getTyphoonTodayInfo();

    @GET("/app/typhoonSta/get-one")
    Observable<TyphoonInfoResult> getTyphoonReportInfo(@Query("id") String id);

    @GET("/app/typhoonSta/list")
    Observable<ReportUnitInfoResult> getTyphoonReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/typhoonSta/save")
    Observable<BaseBean> saveTyphoonReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/typhoonSta/update")
    Observable<BaseBean> updateTyphoonReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/typhoonSta/export-history")
    Call<ResponseBody> exportTyphoonHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/typhoonSta/export")
    Call<ResponseBody> exportTyphoonTodayReportInfo();




    @GET("/app/todayReport/show")
    Observable<TodayReportReportResult> getTodayReportTodayInfo();

    @GET("/app/todayReport/get-one")
    Observable<TodayReportInfoResult> getTodayReportReportInfo(@Query("id") String id);

    @GET("/app/todayReport/list")
    Observable<ReportUnitInfoResult> getTodayReportReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/todayReport/save")
    Observable<BaseBean> saveTodayReportReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/todayReport/update")
    Observable<BaseBean> updateTodayReportReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/todayReport/export-history")
    Call<ResponseBody> exportTodayReportHistotyReportInfo(@Query("searchCode") String searchCode, @Query("date") String from);

    @Streaming
    @GET("/app/todayReport/export")
    Call<ResponseBody> exportTodayReportTodayReportInfo();




    @GET("/app/weekPlan/show")
    Observable<WeekPlanReportResult> getWeekPlanTodayInfo();

    @GET("/app/weekPlan/get-one")
    Observable<WeekPlanInfoResult> getWeekPlanReportInfo(@Query("id") String id);

    @GET("/app/weekPlan/list")
    Observable<ReportUnitInfoResult> getWeekPlanReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/weekPlan/save")
    Observable<BaseBean> saveWeekPlanReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/weekPlan/update")
    Observable<BaseBean> updateWeekPlanReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/weekPlan/export-history")
    Call<ResponseBody> exportWeekPlanHistotyReportInfo(@Query("searchCode") String searchCode, @Query("date") String date);

    @Streaming
    @GET("/app/weekPlan/export")
    Call<ResponseBody> exportWeekPlanTodayReportInfo();




    @GET("/app/spring-fire/show")
    Observable<SpringFireReportResult> getSpringFireTodayInfo();

    @GET("/app/spring-fire/get-one")
    Observable<SpringFireInfoResult> getSpringFireReportInfo(@Query("id") String id);

    @GET("/app/spring-fire/list")
    Observable<ReportUnitInfoResult> getSpringFireReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/spring-fire/save")
    Observable<BaseBean> saveSpringFireReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/spring-fire/update")
    Observable<BaseBean> updateSpringFireReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/spring-fire/export-history")
    Call<ResponseBody> exportSpringFireHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/spring-fire/export")
    Call<ResponseBody> exportSpringFireTodayReportInfo();




    @GET("/app/statistics/show")
    Observable<StatisticsReportResult> getStatisticsTodayInfo();

    @GET("/app/statistics/get-one")
    Observable<StatisticsInfoResult> getStatisticsReportInfo(@Query("id") String id);

    @GET("/app/statistics/list")
    Observable<ReportUnitInfoResult> getStatisticsReportUnitInfo();

    @FormUrlEncoded
    @POST("/app/statistics/save")
    Observable<BaseBean> saveStatisticsReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @FormUrlEncoded
    @POST("/app/statistics/update")
    Observable<BaseBean> updateStatisticsReportInfo(@FieldMap Map<String, String> actionInfoMap);

    @Streaming
    @GET("/app/statistics/export-history")
    Call<ResponseBody> exportStatisticsHistotyReportInfo(@Query("level") String level, @Query("from") String from, @Query("to") String to);

    @Streaming
    @GET("/app/statistics/export")
    Call<ResponseBody> exportStatisticsTodayReportInfo();




    @GET("/app/search/get-list")
    Observable<YqSearchResult> getYqSearchResult(@Query("keyword") String keyword, @Query("from") String from, @Query("to") String to, @Query("source") String source, @Query("region") String region, @Query("city") String city, @Query("page") int page, @Query("pageSize") int pageSize);

    @GET("/app/search/pre")
    Observable<RegionResult> getSearchPreResult();

    @GET("/app/search/get-sub-region")
    Observable<CityResult> getSearchSubRegionResult(@Query("regionCode") String regionCode);
}
